<template>
  <div id="inforpersonal">  
    <div  style="display:flex;margin-bottom:10px;align-items: center;">
            <img class="top_img" src="@/assets/images/echarts_tb3.png" style="width:35px;height:35px;margin-right:10px;"/>
            <div style="line-height: 40px;font-weight:bold:">档案展示-{{ name }}</div>
    </div>

    <div style="padding:0px 60px;">
        <!-- 渲染数据list -->
        <div style="box-shadow: 0px 12px 67px 0px rgba(0, 0, 0, 0.04);width:70%;border-radius: 8px;">
           <div v-if="isshow" style=""><infor-personal-list @up_list_fun="list_fun_new" :datalist="datalist" > </infor-personal-list> </div>
           <div v-if="!isshow" :style="{  height: dtheight + 'px' }">
                 <personal-listnone > </personal-listnone> 
            </div>
        </div>
    </div>
     
  </div>
</template>

<script>
import InforPersonalList from '@/view/Consumer/InforPersonalList'
import PersonalListnone from '@/view/Consumer/PersonalListnone'
export default {
  name: 'inforpersonal',
  data () {
    return {
        datalist:[],
        name:'',
        count:0,
        page:1,
        search_btn_num:1,
        search_mode:1,
        isshow:false
    }
  },
 components:{
    InforPersonalList,
    PersonalListnone
  },
  created(){
     this.dtheight = window.innerHeight - 255
     this.name = this.$route.query.name
     this.list_fun()
  },
  mounted (){
    
  },
  methods: {
    list_fun(){
          this.post("/member/listOfData", {
              page:this.page,
              search_btn_num:this.search_btn_num,
              search_mode:this.search_mode,
              telOrName:this.name,
	        }).then(res => {
            //this.count = res.result.count
            

            if(res.error_code ==1){
                 this.isshow = false
             }else{
                this.datalist = res.result.list
                if(this.datalist.length == 1){
                    this.isshow = true
                    //console.log(this.datalist)
                }else{
                    this.isshow = false
                }
             }
          
           
         })
      },
      list_fun_new(phone){
          this.name = phone
          this.list_fun()
      }
 
  }
}
</script>


<style scoped>
.buttoon_box{
  display:flex;margin-bottom:10px;
}
.buttoon_box_item{
  height:40px;line-height:40px;width:60px;font-size:14px;text-align:center;border-radius:5px;
}
.el-input-box>>>input{
  padding: 0px 3px !important;
}
</style>
